Adding deprecations for old gridliner labels#1507
Conversation
|
Travis ran and failed, I don't know why it didn't post. https://travis-ci.org/github/SciTools/cartopy/builds/671037232 |
|
These were changed in 2f5e568, which I mostly reverted (x&y are the directions of the CRS, not necessarily lat/lon). On the other hand, since gridlines now do bounding box intersections, it's not really guaranteed that x or y will hit just top/bottom or left/right. I'm not sure if we should warn more explicitly about it in the other setters. |
|
I agree, projected coordinates/axes will make this much more confusing with what do x/y and left/right mean? MPL uses I personally think that ylabel_left (the older style) is actually doubly declaring the axes, i.e. can I don't think xlabel_left is even an option there. So, it is probably cleaner to just put label_left in there, rather than with the x/y qualifier. I'm not tied to any particular attribute names, but think they should be consistent throughout the docs. |
|
I think these names might be okay, but can you add the warning on the getter as well? |
|
Sure, added that now. |
|
Actually, looking at #1475, I think we might have too few options, but I'm not sure how best to specify things. On the one plot that is almost-rectangular, there is one latitude label that appears on the left side. So theoretically, we should have left/right/top/bottom options for x & y, but on the other hand we have some projections that don't really have defined sides. |
Fixes #1383
Rationale
The previous gridliners were called
xbottom_labelsand have been renamedbottom_labels, this is adding in a deprecation to allow the old versions to still be used, but warning on it.Also updated the gridliner example to use the new attributes.
Implications